{% extends "bootstrap/base.html" %}
{% block title %}Blog-{{ current_user.username }}{% endblock %}

{% block  navbar %}
{% block head %}
{{ super() }}
<link rel="shortcut icon" href="{{ url_for('static', filename='dx (1).ico') }}" type="image/x-icon">
<link rel="icon" href="{{ url_for('static', filename='dx (1).ico') }}" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
{% endblock %}
<style>
body
 { background-image: url("../static/background.jpg")}
    p {
	    color: rgba(48, 18, 58, 0.74);
	    font: bold 12px/30px Georgia,serif;

      }
    profile-thumbnail {
    position: absolute;
}
    profile-thumbnail {
    position: absolute;
}
profile-header {
    min-height: 260px;
    margin-left: 280px;
}
    navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0;
    margin: 0;
    z-index: 200;}
</style>
<div class="head-top" style=" position: fixed;top: 0;left: 0;width: 100%;height: 64px;padding: 0;margin: 0;z-index: 200;">
<div class="navbar navbar-inverse" role="navigation" style="background-color:rgba(10,8,20,0.91);">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{ url_for('main.index') }}"><span style="white-space:pre"></span>
                <span class="glyphicon glyphicon-home"></span>主页 </a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-left">
                <!--<li><a href="/">Home</a></li> -->
                {% if current_user.is_authenticated %}
                <li><a href="{{ url_for('main.user', username=current_user.username) }}">个人资料</a></li>
                {% endif %}
                <li><a href="weather">天气查询</a></li>
                <li class="disabled"><a href="/">软件</a></li>
                <li class="disabled"><a href="">小说</a></li>
                <li class="disabled"><a href="">音乐</a></li>

                <li><a class="dropdown" data-toggle="dropdown" href="">其他<span class="caret"></span></a>
                     <ul class="dropdown-menu">
                         <li><a href="">视频</a></li>
                         <li><a href="">游戏</a></li>
                         <li><a href="">漫画</a></li>
                     </ul></li>
            </ul>

            <ul class="nav navbar-nav navbar-right">

                {% if current_user.is_authenticated %}
                <ul class="img-rounded profile-thumbnail">
                <li class="dropdown" w>
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" >
                   <img src="{{ current_user.gravatar(size=35) }}">
                       {{ current_user.username }}<b class="caret"></b></a>
                    <ul class="dropdown-menu" style="width: 100%">
                        <li><a href="">修改密码</a></li>
                        <li><a href="">修改邮箱</a></li>
                        <li><a href="{{ url_for('auth.logout') }}"><span class="glyphicon glyphicon-log-out"></span>退出</a></li>

                {% else %}
               <li><a href="{{ url_for('auth.login') }}" class="navbar-link"><span class="glyphicon glyphicon-log-in"></span>登录</a></li>
                <li><a href="{{ url_for('auth.register') }}" class="navbar-link"><span class="glyphicon glyphicon-user"></span>注册</a></li>
                <!-- 登录框弹出 -->
            <!--    <li><button class="btn btn-primary btn-sm" data-target="#mymodal" data-toggle="modal" >
                    <span class="glyphicon glyphicon-user">登录</li>
                    <div class="modal fade" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	                    <div class="modal-dialog">
		                   <div class="modal-content">
			                  <div class="modal-header">
				                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                                 </button>
				                     <h2 class="modal-title" id="myModalLabel">用户登录</h2>
			                  </div>
                               <div class="modal-body">
                                  <form class="form-group" action="">
                                     <div class="form-group">
                                       <label for="">用户名</label>
                                       <input class="form-control" type="text" placeholder="">
                                     </div>
                               <div class="form-group">
                                   <label for="">密码</label>
                                  <input class="form-control" type="password" placeholder="">
                               </div>
                               <div class="text-right">
                                   <button class="btn btn-primary" type="submit">登录</button>
                                   <button class="btn btn-danger" data-dismiss="modal">取消</button>
                               </div>
                            <a href="" data-toggle="modal" data-dismiss="modal" data-target="#register">还没有账号？点我注册</a>
                                  </form>
                               </div> -->
                            <!--<div class="modal-body">
				              <form class="form-group" action="">
                                 <div class="form-group">
                                    <label for="">用户名</label>
                                    <input class="form-control" type="text" placeholder="6-15位字母数字下划线组合">
                                 </div>
                                 <div class="form-group">
                                    <label for="">密码</label>
                                    <input class="form-control" type="password" placeholder="6-15位字母数字下划线组合">
                                 </div>
                                 <div class="form-group">
                                    <label for="">再次输入密码</label>
                                    <input class="form-control" type="password" placeholder="请确认密码">
                                 </div>
                                 <div class="form-group">
                                    <label for="">邮箱</label>
                                    <input class="form-control" type="email" placeholder="82080938@qq.com">
                                 </div>
                            <div class="modal-footer">
                               <button class="btn btn-primary" type="submit">登录</button>
                               <button class="btn btn-danger" data-dismiss="modal">取消</button>
                            </div>
					       </div>
				        </div>
			        </div>
			    </div>-->
                {% endif %}
                    </ul>
                </ul>
            </ul>
        </div>
    </div>
   </div>
</div>
{% endblock %}

{% block content %}
<div class="container" >
    {% for message in get_flashed_messages() %}
    <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alter">&times;</button>
            {{ message }}
    </div>
    {% endfor %}
    {% block page_content %}{% endblock %}
</div>
{% endblock %}

{% block scripts %}
{{ super() }}
{{ moment.include_moment() }}
    <!--使用中文,默认是英语的-->
{{ moment.lang("zh-CN") }}
{% endblock %}

{% block footer %}
{{ super() }}
<div id="mypics" class="carousel slide" data-interval="4000" data-ride="carousel" >
    <ol class="carousel-indicators">
            <li data-slide-to="0" data-target="#mypics" class="active"></li>
            <li data-slide-to="1" data-target="#mypics"></li>
            <li data-slide-to="2" data-target="#mypics"></li>
            <li data-slide-to="3" data-target="#mypics"></li>
            <li data-slide-to="4" data-target="#mypics"></li>
        </ol>
        <div class="carousel-inner">
            <img class="item active" src=" {{url_for('static', filename='pic.jpg') }} " alt="pic" height = "100px" >
            <img class="item" src=" {{url_for('static', filename='map.jpg') }} " alt="pic1" height = "100px" >
            <img class="item" src=" {{url_for('static', filename='pic2.jpg') }} " alt="pic2" height = "100px" >
            <img class="item" src=" {{url_for('static', filename='pic3.jpg') }} " alt="pic3" height = "100px" >
            <img class="item" src=" {{url_for('static', filename='timg (2).jpg') }} " alt="pic4" height = "100px" >
             <img class="item" src=" {{url_for('static', filename='304.png') }} " alt="pic5" height = "100px" >
        </div>
        <a class="carousel-control left" data-slide="prev" href="#mypics">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        </a>
        <a class="carousel-control right" data-slide="next" href="#mypics">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        </a>
    </div>
	<div id="tp-weather-widget" class="xc"></div>
	<script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
<script>tpwidget("init", {
    "flavor": "bubble",
    "location": "WTMKQ069CCJ7",
    "geolocation": "enabled",
    "position": "top-left",
    "margin": "40px 30px",
    "language": "auto",
    "unit": "c",
    "theme": "chameleon",
    "uid": "U9C3E5C1FA",
    "hash": "00dc2c8b62bd6a94631d7639e83fb719"
});
tpwidget("show");</script>
{% endblock %}


